package com.spice.service.entity.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.spice.common.constant.PermissionConstant;
import com.spice.common.model.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("backup_info")
@ApiModel(description = "备份信息")
public class BackupInfo extends BaseEntity {

    @ApiModelProperty(value = "备份的表（不可修改）", example = PermissionConstant.SHAPE_DESC )
    private String tableName;

    @ApiModelProperty(value = "详细说明（可修改）", example = "为了安全起见，修改数据之前备份一次" )
    private String details;

    @ApiModelProperty(value = "备份文件名（不可修改）", example = "" )
    private String backupFileName;

    @Override
    public BackupInfo cleanup() {
        tableName = null;
        backupFileName = null;
        super.cleanup();
        return this;
    }
}
